package com.gdust.gkyx.user.api;

import com.gdust.gkyx.user.service.UserService;
import com.gdust.gkyx.vo.user.LeaderAddressVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: LeaderAddressApiController
 * Package: com.gdust.gkyx.api
 * Description:service-user添加远程调用方法
 * 远程调用接口
 *
 * @Author syun
 * @Create 2025/1/27 20:28
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/user/leader")
public class LeaderAddressApiController {

    @Autowired
    private UserService userService;

    /**
     * //根据userId查询提货点和团长信息
     * @param userId
     * @return
     */
    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId) {
        LeaderAddressVo leaderAddress = userService.getLeaderAddressByUserId(userId);
        return leaderAddress;
    }
}
